//
//  CCImageView.h
//  SelfDriving
//
//  Created by apple on 2017/1/25.
//  Copyright © 2017年 apple. All rights reserved.
//

#import <UIKit/UIKit.h>
#define MAX_SCALE 2.5
#define MIN_SCALE 1.0
typedef enum {
    CCImageViewStyleSmall,  //小图片，默认为初始化的size大小
    CCImageViewStyleLarge   //根据图片大小计算适合的_imageLayer大小
}CCImageViewStyle;

@interface CCImageView : UIImageView
{
@private
    CCImageViewStyle _style;
    NSString *_imageUrl;
    
    CAScrollLayer *_baseLayer;
    CALayer *_imageLayer;
    UIActivityIndicatorView *_indicatorView;
    CATextLayer *_toastLayer;
}
- (id)initWithFrame:(CGRect)frame img:(UIImageView *)img style:(CCImageViewStyle)style;

- (void)startLoad;
- (void)stopLoad;
@end
